var gulp=require('gulp');
var sass=require('gulp-sass'); //编译sass
var prefix=require('gulp-autoprefixer'); //处理浏览器前缀
var cssmin=require('gulp-minify-css');//压缩css
var cssbeautify = require('gulp-cssbeautify'); //css美化

gulp.task('sass',function(){
	return gulp.src('scss/*.scss')
	.pipe(sass())
	.pipe(prefix(
		{
            browsers: ['> 5%','last 2 Explorer versions','Firefox >= 20','last 2 versions'],
            cascade: false,
            remove:false
        }
//	)).pipe(cssmin())
	)).pipe(cssbeautify())
	.pipe(gulp.dest('css'));
})
 gulp.task('watch',function(){
 	gulp.watch('scss/*.scss',gulp.series('sass'));
 })
